<template >
    <div>
        
    </div>
</template>
<script>
import {http } from "../utils/http";
export default {
    data(){
       return{
           payresult:0
       }
    },
    created(){
        console.log(this.$route)
        http.get('/payresult',{params:this.$route.query})
        .then(res=>{
            console.log(res);
            if(res.data.success===1){
               http.get('/paid',{params:{orderId:res.data.target}})
                .then(()=>{
                    this.payresult=1
                    this.$router.push("/myorder");
                })
            }
        })
    }
}
</script>